/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoopp.framework;

import java.security.KeyStore;
import org.apache.http.HttpVersion;
import org.apache.http.client.HttpClient;
import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.HttpParams;
import org.apache.http.params.HttpProtocolParams;

public final class k {
    private static String a = "MyHttpClient";
    private String b;
    private int c;

    public final HttpClient a(int paramInt1, String paramString, int paramInt2) {
        this.b = paramString;
        this.c = paramInt2;
        paramString = null;
        try {
            (paramInt2 = (paramString = new DefaultHttpClient()).getParams()).setParameter("http.connection.timeout",
                    Integer.valueOf(paramInt1));
            paramInt2.setParameter("http.socket.timeout", Integer.valueOf(paramInt1));
            HttpProtocolParams.setVersion(paramInt2, HttpVersion.HTTP_1_1);
            HttpProtocolParams.setContentCharset(paramInt2, "UTF-8");
            KeyStore.getInstance(KeyStore.getDefaultType()).load(null, null);
            paramString.getConnectionManager().getSchemeRegistry()
                    .register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
            return paramString;
        } catch (java.lang.Exception paramInt2) {
            LogUtil.e(a, "Exception", paramInt2);
            if (paramString != null)
                return paramString;
        }
        return new DefaultHttpClient();
    }
}